#!/bin/bash
module load intel/13sp1up1 openmpi/1.7.4/intel13sp1up1
export CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH:/home/pavery/Codes/eigen:/home/pavery/Codes/boost_1_55_0
export CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:/home/pavery/intel/13sp1up1/openmpi-1.7.4-1/ARPACK
/home/pavery/bin/cmake \
-DCMAKE_C_COMPILER:FILEPATH=/opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/icc \
-DCMAKE_CXX_COMPILER:FILEPATH=/opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/icpc \
-DCMAKE_Fortran_COMPILER:FILEPATH=/opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/ifort \
-DCMAKE_CXX_FLAGS:STRING=-wd654,1125,2536,2196,858,161,175,187,3180 \
-DMPI_COMPILER:FILEPATH=/usr/mpi/intel/13sp1up1/openmpi-1.7.4-1/bin/mpiCC \
-DMPI_LIBRARY:STRING=MPI_LIBRARY-NOTFOUND \
-DEXTRALIB="-lifcore -lifport" \
-DLAPACK_LIBRARIES:FILEPATH="-Wl,--start-group /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_scalapack_lp64.a /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_blacs_openmpi_lp64.a /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_sequential.a /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.a -Wl,--end-group" \
-DLAPACK_FOUND:BOOL=true \
-DBLACSLIB:FILEPATH="" \
-DBLACS_FOUND:BOOL=TRUE \
-DSCALAPACKLIB:FILEPATH="" \
-DSCALAPACK_FOUND:BOOL=TRUE \
-DCMAKE_LINKER:FILEPATH=/opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/icpc \
-DCMAKE_BUILD_TYPE=Release ${1:-.} ..
